package com.cloud.logger.zchain.zchainserver;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;


@Aspect
@Component
public class MyAspent {

    @Pointcut("execution(* com.example.demo.controller..*.*(..))")
    public void webLog(){

    }

    @AfterReturning("execution(* com.example.demo.controller..*.*(..)) && @annotation(myAnnotation)")
    public void myas(JoinPoint joinPoint, MyAnnotation myAnnotation){
        if("xy".equals(myAnnotation.value())){

        }

    }
}
